package git.LiuZhanHong.Demo3_18;

public class Rotundity extends Shap{
    private int r;

    public int getR() {
        return r;
    }

    public void setR(int r) {
        this.r = r;
    }

    public Rotundity(String name, int r){
        super.drawing();
        super.setName(name);
        this.r=r;
    }
   public Rotundity(){
       super.drawing();
   }
   public void area()
    {
        double area = Math.pow(r, 2) * Math.PI;
        System.out.println("圆的面积为："+area);
    }
}
